<style>
.kdorder_add {background:#dddddd}
.kdorder_add td{padding:8px; background:#FFF}
.kdorder_add .title_h1 {font-size:14px; color:#333; background:#f0f7ff; font-family:'Microsoft Yahei'; width:115px;}
.kdorder_add .title_h1 em{font-style:normal; color:#F00; margin-right:5px}
.kdorder_add .select_class {border: 1px #CCC solid;height: 30px;border-radius:2px}
.inputBorder{border: 1px #CCC solid;height: 20px;line-height: 20px;padding: 4px 8px; width:220px}
.botton_submit {border:0;background:#ed5736;height:31px;width:100px;text-align:center;line-height:31px;font-family:"Microsoft YaHei";font-size:14px;color:#fff;cursor:pointer;border-radius:4px; margin-right:10px}
</style>
<table cellspacing="1" width="100%" class="kdorder_add">
  <tr>
    <td align="right" class="title_h1">选中的快递单号：</td>
      <td><?php echo $this->_var['yundanhao']; ?><input id="yundanhao" name="yundanhao" type="hidden" value="<?php echo $this->_var['yundanhao']; ?>" /></td>
  </tr>
  <tr>
    <td align="right" class="title_h1"><em>*</em>物流跟踪信息：</td>
    <td><input type="text" id="yudan_text" name="yudan_text" class="inputBorder" value="<?php echo $this->_var['wuliu']['yudan_text']; ?>"/>&nbsp;
    <select id="choosedpl" class="select_class">
	<option value="">快捷物流菜单</option>
    <?php $_from = $this->_var['choos_wuliu']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
    <option value="<?php echo $this->_var['list']; ?>"><?php echo $this->_var['list']; ?></option>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    </select>
    </td>
  </tr>
  <tr>
    <td align="right" class="title_h1">管理员备注：</td>
    <td><textarea name="notes" class="inputBorder" id="notes" style="width:300px;height:40px; font-size:12px" placeholder="该备注不会在前台物流显示。"><?php echo $this->_var['wuliu']['notes']; ?></textarea></td>
  </tr>
  <tr>
    <td align="right" class="title_h1">添加时间：</td>
    <td><input type="text" id="addtime" name="addtime" class="inputBorder" value="<?php echo local_date("Y-m-d H:i:s",$this->_var['wuliu']['addtime']); ?>" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/> <font color="#999999">注意：时间要严格按照时间格式修改</font></td>
  </tr>
  <tr>
    <td align="right" class="title_h1">&nbsp;</td>
    <td><input type="submit" name="imgButton" class="botton_submit" value="添加物流" /></td>
  </tr>  
</table>
<table width="100%" border="0" cellspacing="8" cellpadding="0" id="add_ok" style="display:none" height="240">
  <tr>
    <td width="120" height="35" align="right">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="120" align="right" valign="top"><img src="templates/style/images/welcome.gif" /></td>
    <td valign="top">
	<strong style="font-size:15px; color:#0066CC;font-family:'Microsoft Yahei';" id="show_txt"></strong>
	<div style="border-top:1px #CCCCCC solid; margin-top:20px; padding-top:20px;" >
    <input type="submit" name="imgButton" class="botton_submit" value="关闭窗口" style="background:#999"/>
	</div>
	</td>
  </tr>
</table>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
  $("#choosedpl").change(function(){
	if ($(this).get(0).selectedIndex != 0) {
	  $("#yudan_text").val($(this).val()).focus();
	  $(this).get(0).selectedIndex = 0;
	}
  });
  $(".botton_submit").click(function(){
	if ($("#yundanhao").val() == ""){alert("请选择要添加物流的运单！");$("#yundanhao").focus();return false;}
	if ($("#yudan_text").val() == ""){alert("快递物流跟踪信息不能为空！");$("#yudan_text").focus();return false;}
	$.post("index.php?app=kd_order", {"act": 'piliang_wuliu',"save":'yes',"yundanhao":$("#yundanhao").val(),"yudan_text":$("#yudan_text").val(),"notes":$("#notes").val(),"addtime":$("#addtime").val()},function (data,textStatus){
		$(".kdorder_add").hide();
		$("#add_ok").show();
		$("#add_ok #show_txt").html(data);
		$("#add_ok .botton_submit").click(function(){DialogClose();});		
	});
  });  
});
function DialogClose()
{
	$("#FloatBg").hide();
	$("#FloatBoxBg").hide();
	$("#FloatBox").hide();
}
</script>